﻿<%@ Page Title="Giỏ Hàng :: Realbooks" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="shopping_cart.aspx.cs" Inherits="shopping_cart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <div class="row">

		<div class="col-sm-9 col-sm-12   " id="content">  <div class="breadcrumb">
		<a href="index.html">Trang chủ</a>
		 &raquo; <a href="shopping_cart.html">Giỏ hàng</a>
	  </div>
      <h1>Giỏ hàng		&nbsp;(0.15kg)
	      </h1>
            <form id="form-cart" action="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart" method="post" enctype="multipart/form-data">
	    <div class="cart-info">
	      <div class="shop-cart">
	      <table class="table table-bordered ">
		    <thead>
		      <tr>
			    <td class="image">Hình Ảnh</td>
			    <td class="name">Tên Sách</td>
			    <td class="model">ID</td>
			    <td class="quantity">Số Lượng</td>
			    <td class="price-td">Đơn Giá</td>
			    <td class="total-td" style="border-right:none;">Tổng Cộng</td>
		      </tr>
		    </thead>
  
		    <tbody>
		  					      <tr>
			    <td class="image">			  <a href="products.html"><img src="Images/Grimms Complete Fairy Tales 1 copy-47x47.png" alt="Bereas mioas" title="Bereas mioas" /></a>
			      </td>
			    <td class="name"><a href="products.html">Lập trình ngôn ngữ tư duy - NLP</a>
			  			      <div>
											      </div>
			  			      <small>Điểm thưởng: 400</small>
			      </td>
			    <td class="model">P00001</td>
			    <td class="quantity"><input type="text" name="quantity[28::]" value="1" size="1" />
			  
			      <div class="wrapper mt5">
			      <!--<input class="input-update" type="submit"  alt="Update" title="Update" />-->
			      <a class="input-update" onClick="document.getElementById('form-cart').submit()" ><i class=" fa fa-refresh"></i></a>
			      &nbsp;<a href="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart&amp;remove=28::"><!--<img src="catalog/view/theme/theme338/image/remove.png" alt="Remove" title="Remove" />--><i class="fa fa-trash-o-o"></i></a>
			      </div>
			      </td>
			    <td class="price">115.000</td>
			    <td class="total">115.000</td>
		      </tr>
		  					      <tr>
			    <td class="image">			  <a href="products.html"><img src="Images/The Mayors Tongue by Nathaniel Rich 1 copy-47x47.png" alt="Dolore feroas" title="Dolore feroas" /></a>
			      </td>
			    <td class="name"><a href="products.html">Dốc hết trái tim</a>
			  			      <div>
											      </div>
			      </td>
			    <td class="model">P00009</td>
			    <td class="quantity"><input type="text" name="quantity[36::]" value="1" size="1" />
			  
			      <div class="wrapper mt5">
			      <!--<input class="input-update" type="submit"  alt="Update" title="Update" />-->
			      <a class="input-update" onClick="document.getElementById('form-cart').submit()" ><i class=" fa fa-refresh"></i></a>
			      &nbsp;<a href="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart&amp;remove=36::"><!--<img src="catalog/view/theme/theme338/image/remove.png" alt="Remove" title="Remove" />--><i class="fa fa-trash-o-o"></i></a>
			      </div>
			      </td>
			    <td class="price">95.000</td>
			    <td class="total">95.000</td>
		      </tr>
		  					      <tr>
			    <td class="image">			  <a href="products.html"><img src="Images/The Divine Comedy by Dante 1 copy-47x47.png" alt="Kertyasas" title="Kertyasas" /></a>
			      </td>
			    <td class="name"><a href="products.html">Bí mật của may mắn</a>
			  			      <div>
											      </div>
			  			      <small>Điểm thưởng: 700</small>
			      </td>
			    <td class="model">P00007</td>
			    <td class="quantity"><input type="text" name="quantity[44::]" value="1" size="1" />
			  
			      <div class="wrapper mt5">
			      <!--<input class="input-update" type="submit"  alt="Update" title="Update" />-->
			      <a class="input-update" onClick="document.getElementById('form-cart').submit()" ><i class=" fa fa-refresh"></i></a>
			      &nbsp;<a href="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart&amp;remove=44::"><!--<img src="catalog/view/theme/theme338/image/remove.png" alt="Remove" title="Remove" />--><i class="fa fa-trash-o-o"></i></a>
			      </div>
			      </td>
			    <td class="price">55.000</td>
			    <td class="total">55.000</td>
		      </tr>
		  		  		    </tbody>
	      </table>
		      </div>
	    </div>
      </form>
         <h2>Làm gì ở bước kế tiếp?</h2>
      <div class="content shop-cart-content">
   
	    <p>Lựa chọn bước bên dưới nếu bạn có mã giảm giá hoặc điểm thưởng muốn sử dụng. Hoặc ước lượng chi phí vận chuyển.</p>
	    <table class="radio table table-bordered table-hover">
	  	      <tr class="highlight">
			    <td><div class="radio"><label  for="use_coupon"><input type="radio" name="next" value="coupon" id="use_coupon" />Sử dụng mã COUPON</label></div></td>
	      </tr>
	  	  	      <tr class="highlight">
		     <td><div class="radio"><label  for="use_voucher"><input type="radio" name="next" value="voucher" id="use_voucher" />Sử dụng Voucher</label></div></td>
	      </tr>
	  	  	  	      <tr class="highlight">
		
		    <td><div class="radio"><label  for="shipping_estimate"><input type="radio" name="next" value="shipping" id="shipping_estimate" />Ước lượng chi phí vận chuyển & thuế</label></div></td>
	      </tr>
	  	    </table>
      </div>
      <div class="cart-module">
	    <div id="coupon" class="content">
		    <form class="form-horizontal" action="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart" method="post" enctype="multipart/form-data" id="coup">
			    <div class="form-group">
				    <label class="control-label col-sm-5" for="coupon">Nhập mã COUPON tại đây:&nbsp;</label>
				    <div class="controls col-sm-7">
					    <input type="text" name="coupon" value="" />
					    <input type="hidden" name="next" value="coupon" />&nbsp;
					    <a onclick="$('#coup').submit();" class="button-cont-right">Áp Dụng Coupon<i class="fa fa-arrow-circle-right"></i></a>
				    </div>
			    </div>
		    </form>
	    </div>
	    <div id="voucher" class="content">
		    <form action="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart" method="post" enctype="multipart/form-data" id="gift" class="form-horizontal">
			    <div class="form-group">
				    <label class="control-label col-sm-5" for="voucher">Nhập mã Voucher tại đây:&nbsp;</label>
				    <div class="controls col-sm-7">
					    <input type="text" name="voucher" value="" />
					    <input type="hidden" name="next" value="voucher" />
					    &nbsp;
					    <a onclick="$('#gift').submit();" class="button-cont-right">Áp dụng Voucher<i class="fa fa-arrow-circle-right"></i></a>
				    </div>
			    </div>
			
			
		    </form>
	    </div>
	    <div id="reward" class="content">
		    <form class="form-horizontal"  action="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart" method="post" enctype="multipart/form-data" id="rew">
			    <div class="form-group">
				    <label class="control-label col-sm-5" for="reward">Điểm thưởng (tối đa 300):&nbsp;</label>
				    <div class="controls col-sm-7">
					    <input type="text" name="reward" value="" />
					    <input type="hidden" name="next" value="reward" />
					    &nbsp;
					    <a onclick="$('#rew').submit();" class="button-cont-right">Áp Dụng Điểm Thưởng<i class="fa fa-arrow-circle-right"></i></a>
				    </div>
			    </div>
		    </form>
	    </div>
	    <div id="shipping" class="content">
	      <p>Nhập vào nơi vận chuyển để ước lượng chi phí.</p>
	      <table class="form-horizontal" width="100%">
		    <tr>
			    <td>
				    <div class="form-group">
					    <label class="control-label col-sm-5" for="country_id"><span class="required">*</span> Thành phố:</label>
					    <div class="controls col-sm-7">
						    <select name="country_id">
							    <option value=""> --- Hãy chọn --- </option>
																					    <option value="244">Aaland Islands</option>
																												    <option value="1">Afghanistan</option>
																												    <option value="2">Albania</option>
																												    <option value="3">Algeria</option>
																												    <option value="4">American Samoa</option>
																												    <option value="5">Andorra</option>
																												    <option value="6">Angola</option>
																												    <option value="7">Anguilla</option>
																												    <option value="8">Antarctica</option>
																												    <option value="9">Antigua and Barbuda</option>
																												    <option value="10">Argentina</option>
																												    <option value="11">Armenia</option>
																												    <option value="12">Aruba</option>
																												    <option value="13">Australia</option>
																												    <option value="14">Austria</option>
																												    <option value="15">Azerbaijan</option>
																												    <option value="16">Bahamas</option>
																												    <option value="17">Bahrain</option>
																												    <option value="18">Bangladesh</option>
																												    <option value="19">Barbados</option>
																												    <option value="20">Belarus</option>
																												    <option value="21">Belgium</option>
																												    <option value="22">Belize</option>
																												    <option value="23">Benin</option>
																												    <option value="24">Bermuda</option>
																												    <option value="25">Bhutan</option>
																												    <option value="26">Bolivia</option>
																												    <option value="245">Bonaire, Sint Eustatius and Saba</option>
																												    <option value="27">Bosnia and Herzegovina</option>
																												    <option value="28">Botswana</option>
																												    <option value="29">Bouvet Island</option>
																												    <option value="30">Brazil</option>
																												    <option value="31">British Indian Ocean Territory</option>
																												    <option value="32">Brunei Darussalam</option>
																												    <option value="33">Bulgaria</option>
																												    <option value="34">Burkina Faso</option>
																												    <option value="35">Burundi</option>
																												    <option value="36">Cambodia</option>
																												    <option value="37">Cameroon</option>
																												    <option value="38">Canada</option>
																												    <option value="251">Canary Islands</option>
																												    <option value="39">Cape Verde</option>
																												    <option value="40">Cayman Islands</option>
																												    <option value="41">Central African Republic</option>
																												    <option value="42">Chad</option>
																												    <option value="43">Chile</option>
																												    <option value="44">China</option>
																												    <option value="45">Christmas Island</option>
																												    <option value="46">Cocos (Keeling) Islands</option>
																												    <option value="47">Colombia</option>
																												    <option value="48">Comoros</option>
																												    <option value="49">Congo</option>
																												    <option value="50">Cook Islands</option>
																												    <option value="51">Costa Rica</option>
																												    <option value="52">Cote D'Ivoire</option>
																												    <option value="53">Croatia</option>
																												    <option value="54">Cuba</option>
																												    <option value="246">Curacao</option>
																												    <option value="55">Cyprus</option>
																												    <option value="56">Czech Republic</option>
																												    <option value="237">Democratic Republic of Congo</option>
																												    <option value="57">Denmark</option>
																												    <option value="58">Djibouti</option>
																												    <option value="59">Dominica</option>
																												    <option value="60">Dominican Republic</option>
																												    <option value="61">East Timor</option>
																												    <option value="62">Ecuador</option>
																												    <option value="63">Egypt</option>
																												    <option value="64">El Salvador</option>
																												    <option value="65">Equatorial Guinea</option>
																												    <option value="66">Eritrea</option>
																												    <option value="67">Estonia</option>
																												    <option value="68">Ethiopia</option>
																												    <option value="69">Falkland Islands (Malvinas)</option>
																												    <option value="70">Faroe Islands</option>
																												    <option value="71">Fiji</option>
																												    <option value="72">Finland</option>
																												    <option value="74">France, Metropolitan</option>
																												    <option value="75">French Guiana</option>
																												    <option value="76">French Polynesia</option>
																												    <option value="77">French Southern Territories</option>
																												    <option value="126">FYROM</option>
																												    <option value="78">Gabon</option>
																												    <option value="79">Gambia</option>
																												    <option value="80">Georgia</option>
																												    <option value="81">Germany</option>
																												    <option value="82">Ghana</option>
																												    <option value="83">Gibraltar</option>
																												    <option value="84">Greece</option>
																												    <option value="85">Greenland</option>
																												    <option value="86">Grenada</option>
																												    <option value="87">Guadeloupe</option>
																												    <option value="88">Guam</option>
																												    <option value="89">Guatemala</option>
																												    <option value="241">Guernsey</option>
																												    <option value="90">Guinea</option>
																												    <option value="91">Guinea-Bissau</option>
																												    <option value="92">Guyana</option>
																												    <option value="93">Haiti</option>
																												    <option value="94">Heard and Mc Donald Islands</option>
																												    <option value="95">Honduras</option>
																												    <option value="96">Hong Kong</option>
																												    <option value="97">Hungary</option>
																												    <option value="98">Iceland</option>
																												    <option value="99">India</option>
																												    <option value="100">Indonesia</option>
																												    <option value="101">Iran (Islamic Republic of)</option>
																												    <option value="102">Iraq</option>
																												    <option value="103">Ireland</option>
																												    <option value="104">Israel</option>
																												    <option value="105">Italy</option>
																												    <option value="106">Jamaica</option>
																												    <option value="107">Japan</option>
																												    <option value="240">Jersey</option>
																												    <option value="108">Jordan</option>
																												    <option value="109">Kazakhstan</option>
																												    <option value="110">Kenya</option>
																												    <option value="111">Kiribati</option>
																												    <option value="113">Korea, Republic of</option>
																												    <option value="114">Kuwait</option>
																												    <option value="115">Kyrgyzstan</option>
																												    <option value="116">Lao People's Democratic Republic</option>
																												    <option value="117">Latvia</option>
																												    <option value="118">Lebanon</option>
																												    <option value="119">Lesotho</option>
																												    <option value="120">Liberia</option>
																												    <option value="121">Libyan Arab Jamahiriya</option>
																												    <option value="122">Liechtenstein</option>
																												    <option value="123">Lithuania</option>
																												    <option value="124">Luxembourg</option>
																												    <option value="125">Macau</option>
																												    <option value="127">Madagascar</option>
																												    <option value="128">Malawi</option>
																												    <option value="129">Malaysia</option>
																												    <option value="130">Maldives</option>
																												    <option value="131">Mali</option>
																												    <option value="132">Malta</option>
																												    <option value="133">Marshall Islands</option>
																												    <option value="134">Martinique</option>
																												    <option value="135">Mauritania</option>
																												    <option value="136">Mauritius</option>
																												    <option value="137">Mayotte</option>
																												    <option value="138">Mexico</option>
																												    <option value="139">Micronesia, Federated States of</option>
																												    <option value="140">Moldova, Republic of</option>
																												    <option value="141">Monaco</option>
																												    <option value="142">Mongolia</option>
																												    <option value="242">Montenegro</option>
																												    <option value="143">Montserrat</option>
																												    <option value="144">Morocco</option>
																												    <option value="145">Mozambique</option>
																												    <option value="146">Myanmar</option>
																												    <option value="147">Namibia</option>
																												    <option value="148">Nauru</option>
																												    <option value="149">Nepal</option>
																												    <option value="150">Netherlands</option>
																												    <option value="151">Netherlands Antilles</option>
																												    <option value="152">New Caledonia</option>
																												    <option value="153">New Zealand</option>
																												    <option value="154">Nicaragua</option>
																												    <option value="155">Niger</option>
																												    <option value="156">Nigeria</option>
																												    <option value="157">Niue</option>
																												    <option value="158">Norfolk Island</option>
																												    <option value="112">North Korea</option>
																												    <option value="159">Northern Mariana Islands</option>
																												    <option value="160">Norway</option>
																												    <option value="161">Oman</option>
																												    <option value="162">Pakistan</option>
																												    <option value="163">Palau</option>
																												    <option value="247">Palestinian Territory, Occupied</option>
																												    <option value="164">Panama</option>
																												    <option value="165">Papua New Guinea</option>
																												    <option value="166">Paraguay</option>
																												    <option value="167">Peru</option>
																												    <option value="168">Philippines</option>
																												    <option value="169">Pitcairn</option>
																												    <option value="170">Poland</option>
																												    <option value="171">Portugal</option>
																												    <option value="172">Puerto Rico</option>
																												    <option value="173">Qatar</option>
																												    <option value="174">Reunion</option>
																												    <option value="175">Romania</option>
																												    <option value="176">Russian Federation</option>
																												    <option value="177">Rwanda</option>
																												    <option value="178">Saint Kitts and Nevis</option>
																												    <option value="179">Saint Lucia</option>
																												    <option value="180">Saint Vincent and the Grenadines</option>
																												    <option value="181">Samoa</option>
																												    <option value="182">San Marino</option>
																												    <option value="183">Sao Tome and Principe</option>
																												    <option value="184">Saudi Arabia</option>
																												    <option value="185">Senegal</option>
																												    <option value="243">Serbia</option>
																												    <option value="186">Seychelles</option>
																												    <option value="187">Sierra Leone</option>
																												    <option value="188">Singapore</option>
																												    <option value="189">Slovak Republic</option>
																												    <option value="190">Slovenia</option>
																												    <option value="191">Solomon Islands</option>
																												    <option value="192">Somalia</option>
																												    <option value="193">South Africa</option>
																												    <option value="194">South Georgia &amp; South Sandwich Islands</option>
																												    <option value="248">South Sudan</option>
																												    <option value="195">Spain</option>
																												    <option value="196">Sri Lanka</option>
																												    <option value="249">St. Barthelemy</option>
																												    <option value="197">St. Helena</option>
																												    <option value="250">St. Martin (French part)</option>
																												    <option value="198">St. Pierre and Miquelon</option>
																												    <option value="199">Sudan</option>
																												    <option value="200">Suriname</option>
																												    <option value="201">Svalbard and Jan Mayen Islands</option>
																												    <option value="202">Swaziland</option>
																												    <option value="203">Sweden</option>
																												    <option value="204">Switzerland</option>
																												    <option value="205">Syrian Arab Republic</option>
																												    <option value="206">Taiwan</option>
																												    <option value="207">Tajikistan</option>
																												    <option value="208">Tanzania, United Republic of</option>
																												    <option value="209">Thailand</option>
																												    <option value="210">Togo</option>
																												    <option value="211">Tokelau</option>
																												    <option value="212">Tonga</option>
																												    <option value="213">Trinidad and Tobago</option>
																												    <option value="214">Tunisia</option>
																												    <option value="215">Turkey</option>
																												    <option value="216">Turkmenistan</option>
																												    <option value="217">Turks and Caicos Islands</option>
																												    <option value="218">Tuvalu</option>
																												    <option value="219">Uganda</option>
																												    <option value="220">Ukraine</option>
																												    <option value="221">United Arab Emirates</option>
																												    <option value="222" selected="selected">United Kingdom</option>
																												    <option value="223">United States</option>
																												    <option value="224">United States Minor Outlying Islands</option>
																												    <option value="225">Uruguay</option>
																												    <option value="226">Uzbekistan</option>
																												    <option value="227">Vanuatu</option>
																												    <option value="228">Vatican City State (Holy See)</option>
																												    <option value="229">Venezuela</option>
																												    <option value="230">Viet Nam</option>
																												    <option value="231">Virgin Islands (British)</option>
																												    <option value="232">Virgin Islands (U.S.)</option>
																												    <option value="233">Wallis and Futuna Islands</option>
																												    <option value="234">Western Sahara</option>
																												    <option value="235">Yemen</option>
																												    <option value="238">Zambia</option>
																												    <option value="239">Zimbabwe</option>
																				    </select>
					    </div>
				    </div>
			    </td>
		    </tr>
		    <tr>
			    <td>
				    <div class="form-group">
					    <label class="control-label col-sm-5" for="zone_id"><span class="required">*</span> Quận:</label>
					    <div class="controls col-sm-7">
						    <select name="zone_id">
						    </select>
					    </div>
				    </div>
			    </td>
		    </tr>
		    <tr>
			    <td>
				    <div class="form-group">
					    <label class="control-label col-sm-5" for="zone_id"><span id="postcode-required" class="required">*</span> Phường:</label>
					    <div class="controls col-sm-7">
						    <input type="text" name="postcode" value="" />
					    </div>
				    </div>
			    </td>
		    </tr>
		    <tr>
			    <td>
				    <div class="form-group">
					    <div class="controls col-sm-7">
						    <a id="button-quote" class="button-cont-right">Get Quotes<i class="fa fa-arrow-circle-right"></i></a>
					    </div>
				    </div>
			    </td>
		    </tr>
	      </table>
	      </div>
	    </div>
	  
      <div class="cart-bottom">
	    <div class="cart-total">
	    <table id="total" class="table table-bordered">
	  	      <tr class="row-table-1">
		    <td class="right cart-total-name " ><b>Tổng:</b></td>
		    <td class="right cart-total1 ">265.000 VND</td>
	      </tr>
	  	      <tr class="row-table-2">
		    <td class="right cart-total-name " ><b>Vận chuyển (-2.00):</b></td>
		    <td class="right cart-total1 ">10.000 VND</td>
	      </tr>
	  	      <tr class="row-table-3">
		    <td class="right cart-total-name " ><b>VAT (17.5%):</b></td>
		    <td class="right cart-total1 ">26.500 VND</td>
	      </tr>
	  	      <tr class="row-table-4">
		    <td class="right cart-total-name last" ><b>Thành Tiển:</b></td>
		    <td class="right cart-total1 last">301.500 VND</td>
	      </tr>
	  	    </table>
      </div>
	    <div class="buttons">
	    <div class="right"><a href="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/checkout" class="button-cont-right">Thanh Toán<i class="fa fa-check"></i></a></div>
	    <div class="center"><a href="http://livedemo00.template-help.com/opencart_47983/index.php?route=common/home" class="button-cont-right">Tiếp Tục Mua Sách<i class="fa fa-arrow-circle-right"></i></a></div>
      </div>
      </div>
      </div>

    <aside class="col-sm-2" id="column-right">
        <div class="box account">
      <div class="box-heading">TÀI KHOẢN</div>
      <div class="box-content">
        <ul class="acount">
    	      <li><a href="login.html">Đăng Nhập</a> / <a href="register.html">Đăng Kí</a></li>
              <li><a href="forgot_password.html">Quên mật khẩu</a></li>
              <li><a href="my_account.html">Tài Khoản Của Tôi</a></li>
              <li><a href="address_book.html">Danh bạ</a></li>      <li><a href="wish_list.html">Danh Sách Sách</a></li>
              <li><a href="order_history.html">History Order</a></li>
              <li><a href="download.html">Downloads</a></li>
              <li><a href="returns.html">Returns</a></li>
              <li><a href="transactions.html">Transactions</a></li>
              <li><a href="newsletter.html">Newsletter</a></li>
              <li><a href="recurring_transactions.html">Các Khoản Thanh Toán</a></li>
        </ul>
      </div>
    </div>
      </aside>

    <script type="text/javascript"><!--
        $('input[name=\'next\']').bind('change', function () {
            $('.cart-module > div').hide();

            $('#' + this.value).show();
        });

        //--></script>
    <script type="text/javascript"><!--
        $('#button-quote').live('click', function () {
            $.ajax({
                url: 'index.php?route=checkout/cart/quote',
                type: 'post',
                data: 'country_id=' + $('select[name=\'country_id\']').val() + '&zone_id=' + $('select[name=\'zone_id\']').val() + '&postcode=' + encodeURIComponent($('input[name=\'postcode\']').val()),
                dataType: 'json',
                beforeSend: function () {
                    $('#button-quote').attr('disabled', true);
                    $('#button-quote').after('<span class="wait">&nbsp;<img src="catalog/view/theme/theme338/image/loading.gif" alt="" /></span>');
                },
                complete: function () {
                    $('#button-quote').attr('disabled', false);
                    $('.wait').remove();
                },
                success: function (json) {
                    $('.success, .warning, .attention, .error').remove();

                    if (json['error']) {
                        if (json['error']['warning']) {
                            $('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/theme338/image/close-1.png" alt="" class="close" /></div>');

                            $('.warning').fadeIn('slow');

                            $('html, body').animate({ scrollTop: 0 }, 'slow');
                        }

                        if (json['error']['country']) {
                            $('select[name=\'country_id\']').after('<span class="error">' + json['error']['country'] + '</span>');
                        }

                        if (json['error']['zone']) {
                            $('select[name=\'zone_id\']').after('<span class="error">' + json['error']['zone'] + '</span>');
                        }

                        if (json['error']['postcode']) {
                            $('input[name=\'postcode\']').after('<span class="error">' + json['error']['postcode'] + '</span>');
                        }
                    }

                    if (json['shipping_method']) {
                        html = '<h2>Please select the preferred shipping method to use on this order.</h2>';
                        html += '<form action="http://livedemo00.template-help.com/opencart_47983/index.php?route=checkout/cart" method="post" enctype="multipart/form-data">';
                        html += '  <table class="radio table table-bordered table-hover">';

                        for (i in json['shipping_method']) {
                            html += '<tr>';
                            html += '  <td colspan="3"><b>' + json['shipping_method'][i]['title'] + '</b></td>';
                            html += '</tr>';

                            if (!json['shipping_method'][i]['error']) {
                                for (j in json['shipping_method'][i]['quote']) {
                                    html += '<tr class="highlight">';

                                    if (json['shipping_method'][i]['quote'][j]['code'] == '') {
                                        html += '<td><input type="radio" name="shipping_method" value="' + json['shipping_method'][i]['quote'][j]['code'] + '" id="' + json['shipping_method'][i]['quote'][j]['code'] + '" checked="checked" /></td>';
                                    } else {
                                        html += '<td><input type="radio" name="shipping_method" value="' + json['shipping_method'][i]['quote'][j]['code'] + '" id="' + json['shipping_method'][i]['quote'][j]['code'] + '" /></td>';
                                    }

                                    html += '  <td><label for="' + json['shipping_method'][i]['quote'][j]['code'] + '">' + json['shipping_method'][i]['quote'][j]['title'] + '</label></td>';
                                    html += '  <td style="text-align: right;"><label for="' + json['shipping_method'][i]['quote'][j]['code'] + '">' + json['shipping_method'][i]['quote'][j]['text'] + '</label></td>';
                                    html += '</tr>';
                                }
                            } else {
                                html += '<tr>';
                                html += '  <td colspan="3"><div class="error">' + json['shipping_method'][i]['error'] + '</div></td>';
                                html += '</tr>';
                            }
                        }

                        html += '  </table>';
                        html += '  <br />';
                        html += '  <input type="hidden" name="next" value="shipping" />';

                        html += '  <input type="submit" value="Apply Shipping" id="button-shipping" class="btn" disabled="disabled" />';

                        html += '</form>';

                        $.colorbox({
                            overlayClose: true,
                            opacity: 0.5,
                            width: '600px',
                            height: '400px',
                            href: false,
                            html: html
                        });

                        $('input[name=\'shipping_method\']').bind('change', function () {
                            $('#button-shipping').attr('disabled', false);
                        });
                    }
                }
            });
        });
        //--></script> 
    <script type="text/javascript"><!--
        $('select[name=\'country_id\']').bind('change', function () {
            $.ajax({
                url: 'index.php?route=checkout/cart/country&country_id=' + this.value,
                dataType: 'json',
                beforeSend: function () {
                    $('select[name=\'country_id\']').after('<span class="wait">&nbsp;<img src="catalog/view/theme/theme338/image/loading.gif" alt="" /></span>');
                },
                complete: function () {
                    $('.wait').remove();
                },
                success: function (json) {
                    if (json['postcode_required'] == '1') {
                        $('#postcode-required').show();
                    } else {
                        $('#postcode-required').hide();
                    }

                    html = '<option value=""> --- Please Select --- </option>';

                    if (json['zone'] != '') {
                        for (i = 0; i < json['zone'].length; i++) {
                            html += '<option value="' + json['zone'][i]['zone_id'] + '"';

                            if (json['zone'][i]['zone_id'] == '') {
                                html += ' selected="selected"';
                            }

                            html += '>' + json['zone'][i]['name'] + '</option>';
                        }
                    } else {
                        html += '<option value="0" selected="selected"> --- None --- </option>';
                    }

                    $('select[name=\'zone_id\']').html(html);
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
                }
            });
        });

        $('select[name=\'country_id\']').trigger('change');
        //--></script>
    <div class="clear"></div>
    </div>

</asp:Content>

